import request from './requests.js'
import {
	success_odd_url
} from "./setting.js"

import {
	Toast
} from 'vant'

import {
	getLocalTime
} from "./date.js"


export function success_odd(odd_id, callBack) {

	// console.log(select_all_odd_url)
	return request({
		url: success_odd_url,
		method: 'get',
		params:{
			odd_id: odd_id
		}
	}).then((response) => { //这里使用了ES6的语法
		// console.log(response) //请求成功返回的数据
		let res = response.data.resultBody

		// console.log(res)
		callBack(res)
	}).catch((error) => {
		// console.log(response)
		console.log(error) //请求失败返回的数据
		Toast('接口请求失败，请联系管理员！')
	})
}
export default success_odd